package org.jeecg.modules.common;

import lombok.Data;

@Data
public class FocRespone {
    private Object data;
    private Integer error_code = 0;
    private String error_msg = "ok";

    public FocRespone() {
    }

    public FocRespone(Object data) {
        this.data = data;
    }

    public FocRespone(Integer error_code, String error_msg) {
        this.error_code = error_code;
        this.error_msg = error_msg;
    }

    public FocRespone(Integer error_code, String error_msg, Object data) {
        this.error_code = error_code;
        this.error_msg = error_msg;
        this.data = data;
    }

    public static FocRespone ok(Object data) {
        return new FocRespone(data);
    }
    public static FocRespone ok() {
        return new FocRespone();
    }
    public static FocRespone error(Integer error_code, String error_msg) {
        return new FocRespone(error_code, error_msg);
    }
    public static FocRespone error(Integer error_code, String error_msg, Object data) {
        return new FocRespone(error_code, error_msg, data);
    }
}
